package top.canyue.word_range.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.canyue.word_range.pojo.po.Event;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class EventDto {
    /*
    标题
     */
    private String title;
    /*
    子标题
     */
    private String subTitle;
    /*
    首图URL
     */
    private String imageUrl;
    /*
    内容
     */
    private String detail;
    /*
    开始日期
     */
    private Date startDate;
    /*
    结束日期
     */
    private Date endDate;
    /*
    跳转到的页面名称
     */
    private String rountName;
    /*
    可获得的积分
     */
    private Integer activityIntegral;

    public Event toPo() {
        Event event = new Event();
        event.setTitle(title);
        event.setSubTitle(subTitle);
        event.setImageUrl(imageUrl);
        event.setDetail(detail);
        event.setStartDate(startDate);
        event.setEndDate(endDate);
        event.setRountName(rountName);
        event.setActivityIntegral(activityIntegral);
        return event;
    }
}
